# 作者: YYJ
# 2025年07月12日14时53分12秒
# 2486249622@qq.com

from threading import Thread

def work1(file):
    for i in range(10000):
        file.write(b'a')

def work2(file):
    for i in range(10000):
        file.write(b'b')

if __name__ == '__main__':
    file = open('test.txt', 'wb')
    t1 = Thread(target=work1, args=(file,))
    t2 = Thread(target=work2, args=(file,))
    t1.start()
    t2.start()
    t1.join()
    t2.join()
    file.close()

